package com.dix.codec.bkv;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class ConversionUtils {
    public static byte[] toBKVNumber(int value) {
        return CodecUtil.encodeNumber((long) value);
    }

    public static byte[] toBytes(float value, ByteOrder order) {
        ByteBuffer buffer = ByteBuffer.allocate(4);
        buffer.order(order);
        buffer.putFloat(value);
        return buffer.array();
    }
}